import { createApp } from 'vue';
import App from './App.vue';
import router from './router';
import pinia from '@/store/store';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import echarts from './utils/echarts';

import '@/style.scss';
// 1.重置样式库
import 'normalize.css';
// 2.自定义的项目共用样式
import '@/assets/common/common.scss';

import '@/assets/iconfont/iconfont.css';
import '@/assets/iconfont/iconfont.js';

import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import zhCn from 'element-plus/es/locale/lang/zh-cn';

const app = createApp(App);
app
	.use(router)
	.use(pinia)
	.use(ElementPlus, {
		locale: zhCn,
	})
	.mount('#app');
app.config.globalProperties.$echarts = echarts;
//全局注册Element Icon

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
	app.component(key, component);
}
